package edu.yctc.manage.controller.rest;

import edu.yctc.manage.entity.PageDO;
import edu.yctc.manage.entity.ResultDO;
import edu.yctc.manage.service.ScoreService;
import edu.yctc.manage.utils.PageQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @ClassName ScoreRestController
 * @Description TODO
 * @Author zyj
 * @Date 2021/3/31 16:24
 * @Version 1.0
 **/
@RestController
@RequestMapping("manage/score")
public class ScoreRestController {

    @Autowired
    private ScoreService scoreService;

    @RequestMapping("/get-vo-list")
    public ResultDO getVOList(@RequestParam Map<String, Object> params) {
        PageDO page = scoreService.getScoreVOList(new PageQuery(params));
        return ResultDO.ok().put("page", page);
    }


    @PostMapping("/delete")
    public ResultDO delete(@RequestBody Long[] ids) {
        scoreService.delete(ids);
        return ResultDO.ok();
    }


}
    